<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>

<?php
$con=	mysql_connect("localhost", "root", "kabra");
	
	if (!$con)
  {
  die('Could not connect: ' . mysql_error());
  }
	mysql_select_db("db2") or die('Could not select database');



$result = mysql_query("SELECT * FROM events2");

echo "<table border='1'>
<tr>
<th>Event Name</th>
<th>Date</th>
<th>Time</th>
<th>Venue</th>
<th>Keyword 1</th>
<th>Keyword 2</th>
<th>Keyword 3</th>
</tr>";

while($row = mysql_fetch_array($result))
  {
  echo "<tr>";
  echo "<td>" . $row['event_name'] . "</td>";
  echo "<td>" . $row['date'] . "</td>";
  echo "<td>" . $row['time'] . "</td>";
  echo "<td>" . $row['venue'] . "</td>";
  echo "<td>" . $row['keyOne'] . "</td>";
  echo "<td>" . $row['keyTwo'] . "</td>";
  echo "<td>" . $row['keyThree'] . "</td>";
  echo "</tr>";
  }
echo "</table>";
  
 mysql_close($con); 
  ?>
<body>
</body>
</html>
